/**
 * 类、继承
 */
define(function () {
    function Class() {
    }

    var b = false,
        c = /xyz/.test(function () {xyz}) ? /\b_super\b/ : /.*/;

    Class.extend = function (a) {
        function e() {
            !b && this.init && this.init.apply(this, arguments)
        }

        var f = this.prototype;
        b = true;
        var g = new this;
        b = false;
        for (var h in a) g[h] = "function" == typeof a[h] && c.test(a[h]) && "function" == typeof f[h] ? function (a, b) {
            return function () {
                var c = this._super;
                this._super = f[a];
                var d = b.apply(this, arguments);
                this._super = c;
                return d
            }
        }(h, a[h]) : a[h];
        e.prototype = g;
        e.extend = arguments.callee;
        return e
    };

    Class.prototype.clone = function (a, b) {
        for (var c in a) {
            var g = a[c];
            if (g !== i) {
                var h = {};
                g && "[object Function]" == h.toString.call(g) ? b && (this[c] = g) : this[c] = g
            }
        }
        return this
    };

    return Class
});